package com.ren.article.service;

import com.ren.article.entity.ReclArticle;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ren.article.entity.vo.ReclArticleQueryVo;
import com.ren.article.entity.vo.ReclArticleVo;
import com.ren.utils.page.PageItem;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author RZY
 * @since 2022-07-20
 */
public interface ReclArticleService extends IService<ReclArticle> {

    ReclArticleVo getArticleVoById(Long id);

    PageItem<ReclArticleVo> getArticleOfPage(ReclArticleQueryVo reclArticleQueryVo, long current, long limit);

    boolean updateArticleById(ReclArticle reclArticle);

    boolean delArticleById(Long id);

    boolean addArticle(ReclArticle reclArticle);

    List<ReclArticleVo> getArticleByPraiseUserId(Long userId);

    List<ReclArticleVo> getArticleByCommentUserId(Long userId);

    List<ReclArticleVo> getArticleByCollectionUserId(Long userId);

    PageItem<ReclArticleVo> getFrontArticleOfPage(ReclArticleQueryVo reclArticleQueryVo, long current, long limit);

    List<ReclArticleVo> getArticleVos(List<Long> userIds, List<ReclArticle> reclArticles);
}
